<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlertCityCodeToSystemNotifyCenterTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->unsignedTinyInteger('isOffPop')->default(0)->after('sendAt')->comment('是否关闭弹窗');
            $table->unsignedTinyInteger('popEffectiveDay')->default(0)->after('isOffPop')->comment('弹窗有效期天数-默认7天');
            $table->unsignedInteger('popEffectiveTime')->default(0)->after('popEffectiveDay')->comment('弹窗有效期时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('system_notify_center', function (Blueprint $table) {
            $table->dropColumn('isOffPop');
            $table->dropColumn('popEffectiveDay');
            $table->dropColumn('popEffectiveTime');
        });
    }
}
